<?php

namespace Wantuch\SurveyBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * @ORM\Entity
 * @ORM\Table(name="results")
 */
class Result
{
    /**
     * @ORM\Column(type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    protected $id;

    /**
     * @ORM\Column(type="text")
     */
    protected $resultArray;
    
    /**
     * @ORM\Column(type="datetime", nullable=true)
     */
    protected $createdAt;
    
    /**
     * @ORM\Column(type="datetime", nullable=true)
     */
    protected $updatedAt;
    
    /**
     * @ORM\ManyToOne(targetEntity="Survey", inversedBy="results")
     * @ORM\JoinColumn(name="survey_id", referencedColumnName="id", nullable=true)
     **/
    private $survey;
    
    
    /**
     * @ORM\OneToOne(targetEntity="Invitation", inversedBy="result")
     * @ORM\JoinColumn(name="invitation_id", referencedColumnName="id", nullable=true)
     **/
    private $invitation;

    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set resultArray
     *
     * @param string $resultArray
     * @return Result
     */
    public function setResultArray($resultArray)
    {
        $this->resultArray = $resultArray;

        return $this;
    }

    /**
     * Get resultArray
     *
     * @return string 
     */
    public function getResultArray()
    {
        return $this->resultArray;
    }

    /**
     * Set createdAt
     *
     * @param \DateTime $createdAt
     * @return Result
     */
    public function setCreatedAt($createdAt)
    {
        $this->createdAt = $createdAt;

        return $this;
    }

    /**
     * Get createdAt
     *
     * @return \DateTime 
     */
    public function getCreatedAt()
    {
        return $this->createdAt;
    }

    /**
     * Set updatedAt
     *
     * @param \DateTime $updatedAt
     * @return Result
     */
    public function setUpdatedAt($updatedAt)
    {
        $this->updatedAt = $updatedAt;

        return $this;
    }

    /**
     * Get updatedAt
     *
     * @return \DateTime 
     */
    public function getUpdatedAt()
    {
        return $this->updatedAt;
    }

    /**
     * Set survey
     *
     * @param \Wantuch\SurveyBundle\Entity\Survey $survey
     * @return Result
     */
    public function setSurvey(\Wantuch\SurveyBundle\Entity\Survey $survey = null)
    {
        $this->survey = $survey;

        return $this;
    }

    /**
     * Get survey
     *
     * @return \Wantuch\SurveyBundle\Entity\Survey 
     */
    public function getSurvey()
    {
        return $this->survey;
    }

    /**
     * Set invitation
     *
     * @param \Wantuch\SurveyBundle\Entity\Invitation $invitation
     * @return Result
     */
    public function setInvitation(\Wantuch\SurveyBundle\Entity\Invitation $invitation = null)
    {
        $this->invitation = $invitation;

        return $this;
    }

    /**
     * Get invitation
     *
     * @return \Wantuch\SurveyBundle\Entity\Invitation 
     */
    public function getInvitation()
    {
        return $this->invitation;
    }
}
